We’ll be showing you how to get install Docker on a fresh Ubuntu 14.04 Stack. If you aren’t familiar with Docker already, we recommend you look at this link to learn more and try out the platform. It is assumed that you know how to SSH into your remote machine and execute shell commands. In addition, we’ll assume that you’ve set up your Stack with a non-root account with sudo privileges. Check out our “Getting Started with Your Stack” tutorial if you aren’t sure how to do so.

Installing Dependencies

First, we’ll update our package repositories to make sure we have the most recent and stable packages available to us

sudo apt-get update -y

Now that we’re up to date, we install the required dependencies

sudo apt-get install linux-image-generic-lts-trusty

In order for the changes to take effect, we have to reboot our remote machine.

sudo reboot

It usually takes 2 minutes to reboot a Stack from command line. Perhaps make a cup of coffee or your caffeinated beverage of choice before coming back to your local machine and SSHing into your Stack.

Installing Docker

Now we can install the Docker package. Run the following command:

wget -qO- https://get.docker.com/ | sh

This will download the docker install script and run it. After this is completed, you should have a working Docker image on your Stack. Enter docker into your shell to see the list of commands available to you. Enjoy Stacking your Docker containers!